<!-- 公众号关注 -->
<template>
    <div class="official-account" :style="boxStyle">
        <img :src="officialImage" class="advertising-image" />
    </div>
</template>

<script>
import { defineComponent, toRefs, computed } from 'vue'
import officialImage from '@/assets/images/official-account.png'
export default defineComponent({
    name: 'WidgetOfficialAccount',
    props: {
        element: {
            type: Object,
            default: () => ({})
        }
    },
    setup(props, { emit }) {
        const { element } = toRefs(props)

        const boxStyle = computed(() => {
            const style = element.value.eles.style || {}
            return {
                marginTop: style['margin-top'],
                marginLeft: style['margin-left']
            }
        })
        
        return {
            element,
            officialImage,
            boxStyle
        }
    }
})
</script>

<style lang="less" scoped>
@import './widget-official-account.less';
</style>